package com.atguigu.spring5.factory;

import com.atguigu.spring5.list.Course;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author : wenchao.long
 * @date : Created in 2020/10/29 11:15 周四
 * @description :
 */
public class MyBean implements FactoryBean<Course> {

    @Override
    public Course getObject() throws Exception {
        // 这部分底层是通过工厂模式反射得到的
        Course course = new Course();
        course.setName("abc");
        return course;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
